﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GroupComparer.cs" company="">
//   
// </copyright>
// <summary>
//   The group comparer.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ComparisonTool.Connection
{
    using System;
    using System.Collections;
    using System.Windows.Forms;

    /// <summary>
    /// The group comparer.
    /// </summary>
    public class GroupComparer : IComparer
    {
        /// <summary>
        /// The compare.
        /// </summary>
        /// <param name="objA">
        /// The obj a.
        /// </param>
        /// <param name="objB">
        /// The obj b.
        /// </param>
        /// <returns>
        /// The <see cref="int"/>.
        /// </returns>
        public int Compare(object objA, object objB)
        {
            return string.Compare(((ListViewGroup)objA).Header, ((ListViewGroup)objB).Header, StringComparison.Ordinal);
        }
    }
}